import store from "../../store";
const NewThematicActivities = resolve => require(['../../containers/NewThematicActivities'], resolve);
const GoodsForSF = resolve => require(['../../containers/GoodsForSF'], resolve);
const NewUser = resolve => require(['../../containers/NewUser'], resolve);
const MiddleWare = resolve => require(['../../containers/MiddleWare'], resolve);
const Cart = resolve => require(['../../containers/Cart'], resolve);
const Detail = resolve => require(['../../containers/detail'], resolve);
const giftCardGuidance = resolve => require(['../../containers/giftCardGuidance'], resolve);
let routerArray = [{
		path: "/NewThematicActivities",
		name: "NewThematicActivities",
		component: NewThematicActivities
	},
	{
		path: "/GoodsForSF",
		name: "GoodsForSF",
		component: GoodsForSF
	},
	{
		path: "/NewUser",
		name: "NewUser",
		component: NewUser
	},
	{
		path: "/MiddleWare",
		name: "MiddleWare",
		component: MiddleWare
	},
	{
		title: '购物车',
		path: '/cart',
		name: 'cart',
		component: Cart
	},
	{
		path: "/detail",
		name: "detail",
		title: "详情页",
		component: Detail,
	},
	{
		path: "/giftCardGuidance",
		name: "giftCardGuidance",
		title: "激活引导页面",
		component: giftCardGuidance,
	},
]
// function refreshRouter() {
// 	let params = store.getters["gw/getSpecialTemplateParams"];
// 	if(params.tpConfig && (JSON.parse(params.tpConfig)).config && (JSON.parse(params.tpConfig)).config.pages) {
// 		(JSON.parse(params.tpConfig)).config.pages.forEach(item => {
// 			let obj = {
// 				path: "/" + item.path,
// 				name: item.path,
// 				title: item.title,
// 				state: 1,
// 				component: NewThematicActivities
// 			}
// 			routerArray.push(obj);
// 		});
// 	}
// 	console.log("操作完成的routerArray", routerArray);
// }
// refreshRouter();
export default routerArray;